import Taro, { FC, memo } from '@tarojs/taro'
import classnames from 'classnames'
import { View } from '@tarojs/components'
import './index.scss'

type Props = {
  fullPage?: boolean
  hide?: boolean
}

const Loading: FC<Props> = ({ fullPage, hide }) => {
  const cls = classnames({
    loading_components: true,
    fullPage,
    hide
  })
  return <View className={cls}></View>
}

export default memo(Loading, (oldProps, newProps) => {
  return oldProps.fullPage === newProps.fullPage && oldProps.hide === newProps.hide
})
